<#include "../common/commonattribute.html"/>
<script>
    $(document).on('bjui.beforeCloseDialog', function(e) {
        $(".search-database").click();
    })

    $(".model").each(function(ii,vv){
        var model=$(vv).attr("model");
        $.ajax({
            type: "POST",
            url:"${ctx}/common/getModelJson?model="+model,
            async: true,
            success: function(data){

                var jsonObj = data.code;//转换为json对象
                var html="";
                if(jsonObj){
                for(var i=0;i<jsonObj.length;i++){
                    html+="<option value="+jsonObj[i].codeItem+">"+jsonObj[i].codeItemName+"</option>";
                }
                $(vv).append(html);
                $(vv).selectpicker('refresh')
                $(vv).selectpicker('render');
                }
            }
        });
    });
</script>
<div class="bjui-pageContent">

    <form action="${ctx}/frame/coding" id="familyMemberDialog" data-no-check="true" name="familyForm"
          data-toggle="validate" data-alertmsg="false" data-isrefsh="false" data-callback="fmDialogClose"
          data-rule="required">
        <div style="margin:25px auto 0; width:300px;">

                <table width="80%"  class="table table-condensed table-hover">
                    <tr>
                        <td class="right"><span style="color:red">*</span>模块名称</td>
                        <td class="left">
                <select   data-toggle="selectpicker" data-rule="required"
                          name="modelName" data-rule="required" class="selectpicker model" data-width="100" model="MKGL"/>
                            <!--<input type="text" name="modelName" data-rule="required"></td>-->
                    </tr>


                    <tr>
                        <td class="right"><span style="color:red">*</span>SQL表名称</td>
                        <td class="left"><input type="text" name="sqlTableName" value="${sqlTableName!}" data-rule="required" readonly="true"></td>
                    </tr>
                    <tr>
                        <td class="right"><span style="color:red">*</span>表名称</td>
                        <td class="left"><input type="text" name="tableName" data-rule="required" value="${tableName!}" readonly="true"></td>
                    </tr>
                    <tr>
                        <td class="right"><span style="color:red">*</span>作者</td>
                        <td class="left"><input type="text" name="author" data-rule="required"></td>
                    </tr>
                    <tr>
                        <td class="right">生成路径</td>
                        <td class="left"><input type="text" name="generatePath"></td>
                    </tr>
                    <tr>
                        <td class="right"><span style="color:red">*</span>生成范围</td>
                        <td class="left"><input type="text" name="scope" data-rule="required"></td>
                    </tr>

                </table>

        </div>
    </form>

</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close">关闭</button></li>
        <li><button type="submit" class="btn-default">生成代码</button></li>
    </ul>
</div>